using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._OrthoMapping
{
    /// <summary>
    /// <para>Compute Tie Points</para>
    /// <para>Computes the tie points between  overlapped mosaic dataset items.
    /// The tie points can then be used to compute the block adjustments for the mosaic dataset.</para>
    /// <para>计算重叠镶嵌数据集项之间的连接点。
    /// 然后，可以使用连接点来计算镶嵌数据集的块平差。</para>
    /// </summary>    
    [DisplayName("Compute Tie Points")]
    public class ComputeTiePoints : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ComputeTiePoints()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_mosaic_dataset">
        /// <para>Input Mosaic Dataset</para>
        /// <para>The input mosaic dataset that will be used to create tie points.</para>
        /// <para>将用于创建连接点的输入镶嵌数据集。</para>
        /// </param>
        /// <param name="_out_control_points">
        /// <para>Output Control Points</para>
        /// <para>The output control point table. The table will contain the tie points created by this tool.</para>
        /// <para>输出控制点表。该表将包含此工具创建的连接点。</para>
        /// </param>
        public ComputeTiePoints(object _in_mosaic_dataset, object _out_control_points)
        {
            this._in_mosaic_dataset = _in_mosaic_dataset;
            this._out_control_points = _out_control_points;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Compute Tie Points";

        public override string CallName => "management.ComputeTiePoints";

        public override List<string> AcceptEnvironments => ["parallelProcessingFactor", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_mosaic_dataset, _out_control_points, _similarity.GetGPValue(), _in_mask_dataset, _out_image_features, _density.GetGPValue(), _distribution.GetGPValue(), _location_accuracy.GetGPValue(), _options];

        /// <summary>
        /// <para>Input Mosaic Dataset</para>
        /// <para>The input mosaic dataset that will be used to create tie points.</para>
        /// <para>将用于创建连接点的输入镶嵌数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_mosaic_dataset { get; set; }


        /// <summary>
        /// <para>Output Control Points</para>
        /// <para>The output control point table. The table will contain the tie points created by this tool.</para>
        /// <para>输出控制点表。该表将包含此工具创建的连接点。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Control Points")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_control_points { get; set; }


        /// <summary>
        /// <para>Similarity</para>
        /// <para><xdoc>
        ///   <para>Specifies the similarity level that will be used for matching tie points.</para>
        ///   <bulletList>
        ///     <bullet_item>Low similarity—The similarity criteria for the two matching points will be low. This option will produce the most matching points, but some of the matches may have a higher level of error.</bullet_item><para/>
        ///     <bullet_item>Medium similarity—The similarity criteria for the matching points will be medium.</bullet_item><para/>
        ///     <bullet_item>High similarity—The similarity criteria for the matching points will be high. This option will produce the fewest matching points, but each match will have a lower level of error.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于匹配连接点的相似性级别。</para>
        ///   <bulletList>
        ///     <bullet_item>低相似度—两个匹配点的相似度条件将较低。此选项将生成最多的匹配点，但某些匹配项可能具有更高的误差级别。</bullet_item><para/>
        ///     <bullet_item>中等相似度—匹配点的相似度条件为中等。</bullet_item><para/>
        ///     <bullet_item>高相似度—匹配点的相似性条件将很高。此选项将产生最少的匹配点，但每个匹配的误差级别较低。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Similarity")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _similarity_value _similarity { get; set; } = _similarity_value._MEDIUM;

        public enum _similarity_value
        {
            /// <summary>
            /// <para>Low similarity</para>
            /// <para>Low similarity—The similarity criteria for the two matching points will be low. This option will produce the most matching points, but some of the matches may have a higher level of error.</para>
            /// <para>低相似度—两个匹配点的相似度条件将较低。此选项将生成最多的匹配点，但某些匹配项可能具有更高的误差级别。</para>
            /// </summary>
            [Description("Low similarity")]
            [GPEnumValue("LOW")]
            _LOW,

            /// <summary>
            /// <para>Medium similarity</para>
            /// <para>Medium similarity—The similarity criteria for the matching points will be medium.</para>
            /// <para>中等相似度—匹配点的相似度条件为中等。</para>
            /// </summary>
            [Description("Medium similarity")]
            [GPEnumValue("MEDIUM")]
            _MEDIUM,

            /// <summary>
            /// <para>High similarity</para>
            /// <para>High similarity—The similarity criteria for the matching points will be high. This option will produce the fewest matching points, but each match will have a lower level of error.</para>
            /// <para>高相似度—匹配点的相似性条件将很高。此选项将产生最少的匹配点，但每个匹配的误差级别较低。</para>
            /// </summary>
            [Description("High similarity")]
            [GPEnumValue("HIGH")]
            _HIGH,

        }

        /// <summary>
        /// <para>Input Mask</para>
        /// <para><xdoc>
        ///   <para>A polygon feature class used to exclude areas you do not want in the computation of control points.</para>
        ///   <para>A field with a name of mask can control the inclusion or exclusion of areas. A value of 1 indicates that the areas defined by the polygons (inside) will be excluded from the computation. A value of 2 indicates the defined polygons (inside) will be included in the computation while areas outside of the polygons will be excluded.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个面要素类，用于排除控制点计算中不需要的区域。</para>
        ///   <para>名称为掩码的字段可以控制区域的包含或排除。值为 1 表示由多边形（内部）定义的区域将从计算中排除。值为 2 表示定义的多边形（内部）将包含在计算中，而多边形外部的区域将被排除。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Mask")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_mask_dataset { get; set; } = null;


        /// <summary>
        /// <para>Output Image Features</para>
        /// <para>The output image feature points table. This will be saved as a polygon feature class. This output can be quite large.</para>
        /// <para>输出图像特征点表。这将另存为面要素类。此输出可能非常大。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Image Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_image_features { get; set; } = null;


        /// <summary>
        /// <para>Point Density</para>
        /// <para><xdoc>
        ///   <para>Specifies the number of tie points to be created.</para>
        ///   <bulletList>
        ///     <bullet_item>Low point density—The density of points will be low, creating the fewest number of tie points.</bullet_item><para/>
        ///     <bullet_item>Medium point density—The density of points will be medium, creating a moderate number of points.</bullet_item><para/>
        ///     <bullet_item>High point density—The density of points will be high, creating the highest number of points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要创建的连接点数。</para>
        ///   <bulletList>
        ///     <bullet_item>低点密度 - 点的密度将较低，从而创建最少的连接点数。</bullet_item><para/>
        ///     <bullet_item>中等点密度 - 点的密度将为中等，从而创建中等数量的点。</bullet_item><para/>
        ///     <bullet_item>高点密度 - 点的密度将很高，从而产生最多的点数。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Density")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _density_value _density { get; set; } = _density_value._MEDIUM;

        public enum _density_value
        {
            /// <summary>
            /// <para>Low point density</para>
            /// <para>Low point density—The density of points will be low, creating the fewest number of tie points.</para>
            /// <para>低点密度 - 点的密度将较低，从而创建最少的连接点数。</para>
            /// </summary>
            [Description("Low point density")]
            [GPEnumValue("LOW")]
            _LOW,

            /// <summary>
            /// <para>Medium point density</para>
            /// <para>Medium point density—The density of points will be medium, creating a moderate number of points.</para>
            /// <para>中等点密度 - 点的密度将为中等，从而创建中等数量的点。</para>
            /// </summary>
            [Description("Medium point density")]
            [GPEnumValue("MEDIUM")]
            _MEDIUM,

            /// <summary>
            /// <para>High point density</para>
            /// <para>High point density—The density of points will be high, creating the highest number of points.</para>
            /// <para>高点密度 - 点的密度将很高，从而产生最多的点数。</para>
            /// </summary>
            [Description("High point density")]
            [GPEnumValue("HIGH")]
            _HIGH,

        }

        /// <summary>
        /// <para>Point Distribution</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the points will have regular or random distribution.</para>
        ///   <bulletList>
        ///     <bullet_item>Random point distribution—Points will be generated randomly. Randomly generated points are better for overlapping areas with irregular shapes.</bullet_item><para/>
        ///     <bullet_item>Regular point distribution—Points will be generated based on a fixed pattern. Points based on a fixed pattern use the point density to determine how frequently to create points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定点是具有正则分布还是随机分布。</para>
        ///   <bulletList>
        ///     <bullet_item>随机点分布—点将随机生成。随机生成的点更适合具有不规则形状的重叠区域。</bullet_item><para/>
        ///     <bullet_item>正则点分布—点将基于固定模式生成。基于固定阵列的点使用点密度来确定创建点的频率。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Distribution")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _distribution_value _distribution { get; set; } = _distribution_value._RANDOM;

        public enum _distribution_value
        {
            /// <summary>
            /// <para>Random point distribution</para>
            /// <para>Random point distribution—Points will be generated randomly. Randomly generated points are better for overlapping areas with irregular shapes.</para>
            /// <para>随机点分布—点将随机生成。随机生成的点更适合具有不规则形状的重叠区域。</para>
            /// </summary>
            [Description("Random point distribution")]
            [GPEnumValue("RANDOM")]
            _RANDOM,

            /// <summary>
            /// <para>Regular point distribution</para>
            /// <para>Regular point distribution—Points will be generated based on a fixed pattern. Points based on a fixed pattern use the point density to determine how frequently to create points.</para>
            /// <para>正则点分布—点将基于固定模式生成。基于固定阵列的点使用点密度来确定创建点的频率。</para>
            /// </summary>
            [Description("Regular point distribution")]
            [GPEnumValue("REGULAR")]
            _REGULAR,

        }

        /// <summary>
        /// <para>Image Location Accuracy</para>
        /// <para><xdoc>
        ///   <para>Specifies the keyword that describes the accuracy of the imagery.</para>
        ///   <bulletList>
        ///     <bullet_item>Low image location accuracy—Images have a large shift and a large rotation (> 5 degrees).The SIFT algorithm will be used in the point-matching computation.</bullet_item><para/>
        ///     <bullet_item>Medium image location accuracy—Images have a medium shift and a small rotation (<5 degrees).The Harris algorithm will be used in the point-matching computation.</bullet_item><para/>
        ///     <bullet_item>High image location accuracy—Images have a small shift and a small rotation.The Harris algorithm will be used in the point-matching computation.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定描述影像准确性的关键字。</para>
        ///   <bulletList>
        ///     <bullet_item>影像定位精度低 - 影像具有较大的偏移和较大的旋转（> 5 度）。SIFT算法将用于点匹配计算。</bullet_item><para/>
        /// <bullet_item>中等影像定位精度 - 影像具有中等偏移和小旋转 （<5 度）。Harris 算法将用于点匹配计算。</bullet_item><para/>
        ///     <bullet_item>图像定位精度高 - 图像具有小偏移和小旋转。Harris 算法将用于点匹配计算。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Image Location Accuracy")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _location_accuracy_value _location_accuracy { get; set; } = _location_accuracy_value._MEDIUM;

        public enum _location_accuracy_value
        {
            /// <summary>
            /// <para>Low image location accuracy</para>
            /// <para>Low image location accuracy—Images have a large shift and a large rotation (> 5 degrees).The SIFT algorithm will be used in the point-matching computation.</para>
            /// <para>影像定位精度低 - 影像具有较大的偏移和较大的旋转（> 5 度）。SIFT算法将用于点匹配计算。</para>
            /// </summary>
            [Description("Low image location accuracy")]
            [GPEnumValue("LOW")]
            _LOW,

            /// <summary>
            /// <para>Medium image location accuracy</para>
            /// <para>Medium image location accuracy—Images have a medium shift and a small rotation (<5 degrees).The Harris algorithm will be used in the point-matching computation.</para>
            /// <para>中等影像定位精度 - 影像具有中等偏移和小旋转 （<5 度）。Harris 算法将用于点匹配计算。</para>
            /// </summary>
            [Description("Medium image location accuracy")]
            [GPEnumValue("MEDIUM")]
            _MEDIUM,

            /// <summary>
            /// <para>High image location accuracy</para>
            /// <para>High image location accuracy—Images have a small shift and a small rotation.The Harris algorithm will be used in the point-matching computation.</para>
            /// <para>图像定位精度高 - 图像具有小偏移和小旋转。Harris 算法将用于点匹配计算。</para>
            /// </summary>
            [Description("High image location accuracy")]
            [GPEnumValue("HIGH")]
            _HIGH,

        }

        /// <summary>
        /// <para>Additional Options</para>
        /// <para>Specifies additional options for the adjustment engine. The options are used only by third-party adjustment engines.</para>
        /// <para>指定调整引擎的附加选项。这些选项仅供第三方调整引擎使用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Additional Options")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _options { get; set; } = null;


        public ComputeTiePoints SetEnv(object parallelProcessingFactor = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}